home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_u_z / vxb102.zip / VXBTEST.ZIP / VXFORM2.FRM (.txt) < prev    next >
Visual Basic Form  |  1991-12-03  |  13KB  |  332 lines

  1. VXFORM2
  2. Aircraft Types
  3. Form3
  4. Label1
  5.     Type Code
  6. Tms Rmn
  7. TypeCode
  8. Label2
  9. Description
  10. Tms Rmn
  11. TypeDesc
  12. TypeSave
  13. &Save
  14. TypeCancel
  15. &Cancel
  16. TypeAdd
  17. TypeDelete
  18. &Delete
  19. TypeNext
  20. &Next
  21. TypePrev
  22.     &Previous
  23. TypeBrowse
  24. &Browse
  25. TypeExit
  26. E&xit
  27. Label3
  28. Status
  29. Tms Rmn
  30. TypeStatus
  31. Form_Click
  32. @    Form_Load=
  33. TypeReturn
  34. BROWSE_ADD
  35. TypeDataClear
  36. TypeDataLoadz
  37. BROWSE_DELETE
  38. vxDeleteRec    
  39. TypeCodev
  40. TypeDesc
  41. vxfieldT
  42. TypeCode_Change
  43. TypeCode_KeyPress
  44. KeyAscii3
  45. TypeSave_Click
  46. TypeDesc_Change
  47. vxFieldSize
  48. vxSeek
  49. vxAppendBlank(
  50. vxReplString
  51. vxWriteI
  52. vxAppendBlankEnd
  53. TypeStatus
  54. vxRecNoq
  55. Deleted
  56. BROWSE_EDIT;
  57. TypeSaveh
  58. Enabled
  59. FALSE
  60. TypeCancel
  61. TypeAddy
  62. TypeDeleteZ
  63. TypeAdd_Click
  64. TypeBrowse_Click6
  65. VXFORM2
  66. BrowseTypes
  67. TypeCancel_Click
  68. TypeDelete_Click
  69. TypeExit_Click
  70. VXFORM17
  71. TypeNext_Click_
  72. vxSkip)
  73. vxEof
  74. vxBottom
  75. FALSETypeDelete
  76. TypeNextp
  77. TypePrevV
  78. TypeBrowses
  79. TypePrev_Click
  80.     vxDeleted~
  81. vxBof
  82. vxTopy
  83. SeekKey
  84. RString
  85. vxSelectDbf
  86. AirtypesDbf
  87. vxClose
  88. vxTableReset=
  89. AircraftDbf
  90. vxUseDbf
  91. Aircraf1Ntx
  92. vxUseNtx
  93. Aircraf2Ntxx
  94. vxTableDeclare
  95. VX_GREEN*
  96. vxTableField
  97. VX_FIELD`
  98. hwndCp
  99. GetFocus
  100. SendMessageH
  101. EM_LIMITTEXT
  102. Empty)
  103. EmptyString$
  104. Form_GotFocus3
  105. NumRecs\
  106. TextStatus
  107. DescSize
  108. CodeSize
  109. vxSelectNtx
  110. AirtypesNtx
  111. vxEnd
  112. vxBeg
  113. TypeCode_GotFocusG
  114. TypeDesc_GotFocus
  115. RecNumk
  116. Form_Unload
  117. Cancel    
  118. TypeDesc_KeyPress
  119. BROWSE_USER
  120. wants
  121. WINAPI
  122. GlobalsZ
  123. section
  124. along+
  125.     constants
  126. BROWSE_MISC
  127. Visible
  128. CursorWait
  129. CursorArrow
  130. unloaded|
  131. because
  132. needed
  133. again
  134. vxUnlock
  135. vxFilter
  136. Form_Paint
  137. vxFormGray
  138. vxFormFrame
  139. vxCtlStyle
  140. RECESSh
  141.     VX_RECESS
  142. hwind
  143. cmode|
  144. fwindow
  145. Frame1
  146.     VX_CREASE
  147. TypeStatus_Changep
  148. VX_RAISE!
  149. TyepStatus8
  150. Enbled
  151. TypeStatus_GotFocus
  152. CurrHwnd
  153. SetFocusAPI
  154. CustReturn
  155. CustDelete_Click
  156. vxCtlLength
  157. deregister
  158. areaE
  159. ENTRIES
  160. properly
  161. registered5
  162. controls
  163. thisR
  164. guarantees
  165. smooth
  166. multitasking
  167.     operation
  168. vxWindowDereg5    
  169.     OpenTypes
  170. OpenCust
  171.     PackFiles
  172. TestCreate
  173. TestCopy
  174. TestDataCopy
  175. should
  176. unlocked        
  177. interested%    
  178.     MultiUser
  179. Considerations
  180. discussion
  181. TypeChange
  182. vxLockRecord
  183. Form2Active
  184. Form_Load
  185.  On form load analyze results of browse return
  186.  ALWAYS select the database as the first statement
  187.  in the FORM_LOAD procedure. This registers thee
  188.  select area with the vxBase System Task manager.
  189.  You MUST also select the database as the firstr
  190.  statement in the FORM_PAINT procedure. This
  191.  registers the select area with the vxBase Taskr
  192.  Window manager. If you do these two things, vxBase
  193.  will ensure smooth multiwindow operation in the
  194.  task, and also smooth multitasking operation if you
  195.  wish to run more than one Visual Basic vxBase program
  196.  at the same time (or multiple instances of the same
  197.  Visual Basic vxBase program.e
  198. Record addition request"
  199.  if user pressed ENTER then file is positioned
  200.  at current record and the record number ism
  201.  returned in TypeReturn. In this case we assume 
  202.  he wants to edit that record. s
  203.  call general proc to load controlso
  204. Edit record 
  205. TypeDataClear
  206.  Clear Form in preparation for add or after successful delete 
  207.  ensure database unlockedu
  208. TypeDataLoad
  209.  Load data from current record
  210.  ensure data entry enabled
  211. category
  212. catname"
  213.  unlock for multiusers
  214.  In a multiuser or multitasking environment, the filef
  215.  should be unlocked after you have extracted the datad
  216.  you are interested in. See the "MultiTasking and 
  217.  MultiUser Considerations" section in the manual for
  218.  a full discussion.n
  219. TypeCode_KeyPress
  220.  Convert type code to uppercase as it is being entered
  221.  also convert enter key to tab
  222. {Tab}"
  223. TypeSave_Click
  224.  Validate data when save button is pressed
  225.  verify something in the field
  226. Field cannot be empty"
  227.  note that if this was a real application we wouldn'td
  228.  allow a change to the type code if the record was being
  229.  edited unless we were prepared to cross reference all
  230.  of the other files affected by a change. We alsoa
  231.  wouldn't allow the onscreen edit in the browse. This is
  232.  just a sample application.e
  233.  verify unique key if adding
  234. Duplicate Key on Add
  235.  Data passed. Put it awaya
  236.  notice the brackets around the control property
  237.  below which gets at the data contained thereinr
  238. category
  239. catname"
  240.  Update status box
  241. Record "
  242.  appended"
  243. Record "
  244.  saved
  245.  Update Button Status-
  246.  ensure database unlockedu
  247. TypeAdd_Click
  248.  clear form for addition of new record
  249. Record Addition Request"
  250.  ensure data entry enabled
  251.  reset the buttons
  252. TypeBrowse_Click
  253.  current form is unloaded because if needed again
  254.  the form_load proc must be invoked to reset the
  255.  control datad
  256.  so we don't close files
  257.  when we unload the form
  258. TypeCancel_Click
  259.  Clear form data and reset button status
  260. Operation cancelled"
  261.  we must disable data entry because the user
  262.  could enter a new record in the blank boxes
  263.  and then press the Add button. The TypeAdd_Click
  264.  routine clears the form boxes again prior tor
  265.  accepting input so the user's work would be lostl
  266.  and he would be mad.m
  267. TypeDelete_Click
  268.  get user confirmation of delete
  269. Confirm Delete
  270.  Deleted
  271. Delete failed"
  272. Delete cancelled
  273. TypeExit_Click
  274.  unloading the form performs cleanup for usr
  275. TypeNext_Click
  276.  skip forward one record
  277.  if skip error, only allow exite
  278. Error on Skip Next. Try Reindex.
  279.  test for end of filef
  280. End of File!
  281. Skipped to record 
  282. TypePrev_Click
  283.  skip back one recordd
  284.  if skip error, only allow exitN
  285. Error on Skip Previous. Try Reindex.
  286.  test for beginning of filer
  287. Beginning of File!
  288. Skipped to record 
  289. TypeCode_GotFocus
  290.  set up text length limiti
  291. category#
  292. TypeDesc_GotFocus
  293.  set up text length limit-
  294. catname"#
  295. Form_Unload
  296.  close types file and reset tablea
  297.  and reenable menu items if we're
  298.  NOT being unloaded by the Browse button
  299.  IT IS IMPORTANT THAT YOU DEREGISTER
  300.  THE WINDOW THAT THE FILE SELECT
  301.  AREA WAS ATTACHED TO IN THE FORM_UNLOAD PROC.
  302.  IF YOU DON'T, YOU ARE LIABLE TO RUN OUT OFT
  303.  TASK-WINDOW ENTRIES (96 in all are allowed)
  304.  If BrowseTypes is invoked by clicking the Browseo
  305.  button on the edit form, we don't want to close
  306.  the files. If we get here for any other reasona
  307.  (like picking the exit button on the form orm
  308.  using the System menu to close the window) then
  309.  we close the files, release the table memory, and
  310.  reshow the menu form so the user can pick something
  311.  else.
  312. TypeDesc_KeyPress
  313.  convert ENTER to tab 
  314. {Tab}"
  315. Form_Paint
  316.  ALWAYS select the database as the first statement
  317.  in the FORM_LOAD procedure. This registers thee
  318.  select area with the vxBase System Task manager.
  319.  You MUST also select the database as the firstr
  320.  statement in the FORM_PAINT procedure. This
  321.  registers the select area with the vxBase Taskr
  322.  Window manager. If you do these two things, vxBase
  323.  will ensure smooth multiwindow operation in the
  324.  task, and also smooth multitasking operation if you
  325.  wish to run more than one Visual Basic vxBase program
  326.  at the same time (or multiple instances of the same
  327.  Visual Basic vxBase program.e
  328.  paint three dimensional controlsr
  329.  if delete request from browse, do it now
  330.  because we must let enhanced controls
  331.  paint before asking for delete confirmation
  332.